package com.laizhenghua.order.service;

import com.laizhenghua.commons.entity.CommonResult;
import com.laizhenghua.commons.entity.PaymentEntity;
import com.laizhenghua.commons.utils.R;
import com.laizhenghua.order.service.impl.PaymentFallbackServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @description: OpenFeignService
 * @date: 2022/2/13 10:07
 */
@Component(value = "paymentFeignService")
@FeignClient(name = "CLOUD-PAYMENT-8001", fallback = PaymentFallbackServiceImpl.class)
// @RequestMapping(path = "/payment")
public interface PaymentFeignService {
    @RequestMapping(path = "/payment/testOk", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
    public R testOk();

    @RequestMapping(path = "/payment/testError", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
    public R testError();

}
